import { reactive } from "vue";

export interface IModal<T> {
  visible: boolean;
  echo?: T;
  type?: "添加" | "修改" | "复制";
}

// 弹框状态
export function useModal<T>(
  defaultState: IModal<T> = {
    visible: false,
  }
) {
  const result = reactive<IModal<T>>(defaultState);
  return result;
}
